
const routes = [
  {
    path: '/',
    component: 'Layout',
    redirect: '/dashboard',
    name: 'Home',
    alwaysShow: true,
    children: [{
      path: '/dashboard',
      name: 'Dashboard',
      component: 'views/dashboard/index',
      meta: { title: '首页', icon: 'dashboard' }
    }]
  },

  {
    path: '/long',
    component: 'Layout',
    redirect: '/long/index',
    name: 'long',
    meta: { title: '长期车辆管理', icon: 'el-icon-help' },
    children: [
      {
        path: '/long/index',
        name: 'Index',
        component: 'views/interiorVehicle/index',
        meta: { title: '长期车辆管理' }
      },
      {
        path: '/long/import',
        name: 'Import',
        component: 'views/interiorVehicle/import',
        meta: { title: '长期车辆批量导入' }
      },
      {
        path: '/long/appproval',
        name: 'Approval',
        component: 'views/interiorVehicle/approval',
        meta: { title: '长期车辆审批' }
      },
      {
        path: '/long/record',
        name: 'Record',
        component: 'views/interiorVehicle/record',
        meta: { title: '车辆出入记录查询' }
      }
    ]
  },

  {
    path: '/temporary',
    component: 'Layout',
    redirect: '/temporary/index',
    name: 'temporary',
    meta: { title: '临时车辆管理', icon: 'el-icon-document' },
    children: [
      {
        path: '/temporary/index',
        name: 'Index',
        component: 'views/temporaryVehicles/index',
        meta: { title: '登记列表' }
      },
      // {
      //   path: '/temporary/details',
      //   name: 'Details',
      //   component: 'views/temporaryVehicles/details',
      //   meta: { title: '登记记录详情' }
      // },
      {
        path: '/temporary/record',
        name: 'Record',
        component: 'views/temporaryVehicles/record',
        meta: { title: '车辆出入记录查询' }
      }
    ]
  },

  // {
  //   path: '/data',
  //   component: 'Layout',
  //   redirect: '/data/article',
  //   name: 'Data',
  //   meta: { title: '数据统计', icon: 'el-icon-s-data' },
  //   children: [
  //     {
  //       path: '/data/article',
  //       name: 'Article',
  //       component: 'views/data/index',
  //       meta: { title: '文章统计' }
  //     }
  //   ]
  // },

  // {
  //   path: '/nested',
  //   component: 'Layout',
  //   redirect: '/nested/menu1',
  //   name: 'Nested',
  //   meta: {
  //     title: '多级菜单',
  //     icon: 'el-icon-s-operation'
  //   },
  //   children: [
  //     {
  //       path: '/nested/menu1',
  //       alwaysShow: true,
  //       redirect: '/nested/menu1/menu1-1',
  //       component: 'views/nested/menu1/index', // Parent router-view
  //       name: 'Menu1',
  //       meta: { title: '二级菜单' },
  //       children: [
  //         {
  //           path: '/nested/menu1/menu1-1',
  //           component: 'views/nested/menu1/menu1-1/index',
  //           name: 'Menu1-1',
  //           meta: { title: '三级菜单' }
  //         },
  //         {
  //           path: '/nested/menu1/menu1-2',
  //           alwaysShow: true,
  //           redirect: 'noRedirect',
  //           component: 'views/nested/menu1/menu1-2/index',
  //           name: 'Menu1-2',
  //           meta: { title: '三级菜单' },
  //           children: [
  //             {
  //               path: '/nested/menu1/menu1-2/menu1-2-1',
  //               component: 'views/nested/menu1/menu1-2/menu1-2-1/index',
  //               name: 'Menu1-2-1',
  //               meta: { title: '四级菜单' }
  //             },
  //             {
  //               path: '/nested/menu1/menu1-2/menu1-2-2',
  //               component: 'views/nested/menu1/menu1-2/menu1-2-2/index',
  //               name: 'Menu1-2-2',
  //               meta: { title: '四级菜单' }
  //             }
  //           ]
  //         },
  //         {
  //           path: '/nested/menu1/menu1-3',
  //           component: 'views/nested/menu1/menu1-3/index',
  //           name: 'Menu1-3',
  //           meta: { title: '三级菜单' }
  //         }
  //       ]
  //     },
  //     {
  //       path: '/nested/menu2',
  //       component: 'views/nested/menu2/index',
  //       name: 'Menu2',
  //       meta: { title: '二级菜单' }
  //     }
  //   ]
  // },

  // {
  //   path: '/site',
  //   component: 'Layout',
  //   alwaysShow: true,
  //   children: [
  //     {
  //       path: '/site/index',
  //       name: 'Site',
  //       component: 'views/site/index',
  //       meta: { title: '站点设置', icon: 'el-icon-setting' }
  //     }
  //   ]
  // },

  {
    path: '/setting',
    component: 'Layout',
    redirect: '/setting/user',
    name: 'Setting',
    meta: { title: '系统管理', icon: 'el-icon-s-tools' },
    children: [
      {
        path: '/setting/user',
        name: 'User',
        component: 'views/user/index',
        meta: { title: '用户管理' }
      },
      {
        path: '/setting/role',
        name: 'Role',
        component: 'views/role/index',
        meta: { title: '角色管理' }
      },
      {
        path: '/setting/permission',
        name: 'Permission',
        component: 'views/permission/index',
        meta: { title: '权限管理' }
      },
      // {
      //   path: '/setting/menu',
      //   name: 'Menu',
      //   component: 'views/menu/index',
      //   meta: { title: '菜单管理' }
      // },
      // {
      //   path: '/setting/log',
      //   name: 'Log',
      //   component: 'views/log/index',
      //   meta: { title: '日志管理' }
      // }
    ]
  },

  // {
  //   path: 'external-link',
  //   component: 'Layout',
  //   alwaysShow: true,
  //   children: [
  //     {
  //       path: 'https://panjiachen.gitee.io/vue-element-admin-site/zh/',
  //       meta: { title: '文档', icon: 'el-icon-link' }
  //     }
  //   ]
  // }
]

module.exports = [
  // get routes
  {
    url: '/vue-admin-template/permission/getroutes',
    type: 'get',
    response: () => {
      return {
        code: 200,
        data: { list: routes }
      }
    }
  }
]
